package br.com.rankingme.dao;

import java.sql.Connection;
import java.sql.DriverManager;

public class AbstractDAO {
	
	//private DataSource dataSource;
	
	private static final String DRIVER = "oracle.jdbc.OracleDriver";
	private static final String URL = "jdbc:oracle:thin:@localhost:1521:xe";
    private static final String USERNAME = "ranking";
    private static final String PASSWORD = "ranking";
	
	protected Connection getConnection(){
		Connection connection = null;
		try {
			
			Class.forName(DRIVER);
			//dataSource.
            connection = DriverManager.getConnection(URL, USERNAME, PASSWORD);
			
		} catch (Exception e) {
			e.printStackTrace();
			return null;
		}
		return connection;
	}

}
